package com.fh.shop.api.common;

public enum ResponseEnum {



    CART_PRODUCT_IS_NULL(5000, "添加购物车中的商品不存在"),
    CART_PRODUCT_STATUS_IS_DOWN(5001, "添加购物车中的商品已下架"),
    CART_PRODUCT_STOCK_IS_ERROR(5002, "商品库存不足"),
    CART_PRODUCT_COUNT_IS_ERROR(5003, "商品数量非法"),
    CART_IS_NULL(5004, "购物车不存在"),
    CART_PRODUCT_ID_IS_ERROR(5005, "商品id错误"),

    TOKEN_IS_NULL(4000, "token为空"),
    TOKEN_FORMAT_IS_ERROR(4001, "token格式错误"),
    TOKEN_VALIDATE_IS_ERROR(4002, "验签失败"),
    TOKEN_TIME_OUT(4003, "token超时了"),
    TOKEN_IS_MISMATH(4005, "token不匹配"),
    TOKEN_DECODE_FAIL(4004, "解码失败"),

    MEMBER_ACTIVE_ID_IS_NULL(6000, "激活会员的id错误"),
    MEMBER_ACTIVE_MAIL_NOT_EXIST(6001, "邮箱不存在"),
    MEMBER_IS_ACTIVE(6002, "会员已经激活了"),
    MEMBER_LOGIN_IS_NULL(3000, "登录信息为空"),
    MEMBER_LOGIN_NAME_ERROR(3001, "登录时会员名错误"),
    MEMBER_LOGIN_PASSWORD_ERROR(3002, "登录时密码错误"),
    MEMBER_PWD_IS_NULL(3003, "修改密码，信息为空"),
    MEMBER_PWD_IS_MISMATCH(3004, "修改密码，密码不一致"),
    MEMBER_PWD_OLD_IS_ERROR(3005, "修改密码，旧密码错误"),
    MEMBER_LOGIN_STATUS_ERROR(3006, "登录时,会员未激活"),
    MEMBER_REG_IS_NULL(2000, "注册为空"),
    MEMBER_REG_SMS_CODE_IS_ERROR(2002, "短信验证码错误"),
    MEMBER_REG_NAME_IS_EXIST(2003, "会员名已存在"),
    MEMBER_REG_PHONE_IS_EXIST(2004, "手机号已存在"),
    MEMBER_REG_MAIL_IS_EXIST(2005, "邮箱已存在"),
    MAIL_IS_ERROR(2007, "邮箱格式错误"),
    MEMBER_REG_PHONE_IS_ERROR(2006, "手机号格式错误"),
    MEMBER_REG_PASSWORD_MISMATCH(2001, "密码不一致"),
    SMS_PHONE_IS_NULL(1000, "手机号为空");
    private int code;

    private String msg;

    private ResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
